(function(e, t) {
function n(e) {
return function(t) {
return Object.prototype.toString.call(t) === "[object " + e + "]";
};
}
function r() {
return L++;
}
function i(e) {
return e.match(M)[0];
}
function s(e) {
e = e.replace(_, "/");
while (e.match(D)) e = e.replace(D, "/");
return e;
}
function o(e) {
var t = e.length - 1;
return e.charAt(t) === "#" ? e.substring(0, t) : e.substring(t - 2) === ".js" || e.indexOf("?") > 0 || e.substring(t - 3) === ".css" ? e : e + ".js";
}
function u(e) {
var t = x.alias;
return t && N(t[e]) ? t[e] : e;
}
function a(e) {
var t = x.paths, n;
return t && (n = e.match(P)) && N(t[n[1]]) && (e = t[n[1]] + n[2]), e;
}
function f(e) {
var t = x.vars;
return t && e.indexOf("{") > -1 && (e = e.replace(H, function(e, n) {
return N(t[n]) ? t[n] : e;
})), e;
}
function l(e) {
var t = x.map, n = e;
if (t) for (var r = 0, i = t.length; r < i; r++) {
var s = t[r];
n = k(s) ? s(e) || e : e.replace(s[0], s[1]);
if (n !== e) break;
}
return n;
}
function c(e, t) {
var n, r = e.charAt(0);
if (B.test(e)) n = e; else if (r === ".") n = s((t ? i(t) : x.cwd) + e); else if (r === "/") {
var o = x.cwd.match(j);
n = o ? o[0] + e.substring(1) : e;
} else n = x.base + e;
return n;
}
function h(e, t) {
if (!e) return "";
e = u(e), e = a(e), e = f(e), e = o(e);
var n = c(e, t);
return n = l(n), n;
}
function p(e) {
return e.hasAttribute ? e.src : e.getAttribute("src", 4);
}
function d(e, t, n) {
var r = V.test(e), i = F.createElement(r ? "link" : "script");
if (n) {
var s = k(n) ? n(e) : n;
s && (i.charset = s);
}
v(i, t, r), r ? (i.rel = "stylesheet", i.href = e) : (i.async = !0, i.src = e), J = i, X ? W.insertBefore(i, X) : W.appendChild(i), J = null;
}
function v(e, t, n) {
var r = n && (Q || !("onload" in e));
if (r) {
setTimeout(function() {
m(e, t);
}, 1);
return;
}
e.onload = e.onerror = e.onreadystatechange = function() {
$.test(e.readyState) && (e.onload = e.onerror = e.onreadystatechange = null, !n && !x.debug && W.removeChild(e), e = null, t());
};
}
function m(e, t) {
var n = e.sheet, r;
if (Q) n && (r = !0); else if (n) try {
n.cssRules && (r = !0);
} catch (i) {
i.name === "NS_ERROR_DOM_SECURITY_ERR" && (r = !0);
}
setTimeout(function() {
r ? t() : m(e, t);
}, 20);
}
function g() {
if (J) return J;
if (K && K.readyState === "interactive") return K;
var e = W.getElementsByTagName("script");
for (var t = e.length - 1; t >= 0; t--) {
var n = e[t];
if (n.readyState === "interactive") return K = n, K;
}
}
function y(e) {
var t = [];
return e.replace(Y, "").replace(G, function(e, n, r) {
r && t.push(r);
}), t;
}
function b(e, t) {
this.uri = e, this.dependencies = t || [], this.exports = null, this.status = 0, this._waitings = {}, this._remain = 0;
}
function w(e, t) {
var n = {
id: e,
refUri: t
};
return O("resolve", n), n.uri || h(n.id, t);
}
function E(e, t) {
var n = b.get(e);
n.status < it.SAVED && (n.id = t.id || e, n.dependencies = t.deps || [], n.factory = t.factory, n.status = it.SAVED);
}
if (e.seajs) return;
var S = e.seajs = {
version: "2.1.0"
}, x = S.data = {}, T = n("Object"), N = n("String"), C = Array.isArray || n("Array"), k = n("Function"), L = 0, A = x.events = {};
S.on = function(e, t) {
var n = A[e] || (A[e] = []);
return n.push(t), S;
}, S.off = function(e, t) {
if (!e && !t) return A = x.events = {}, S;
var n = A[e];
if (n) if (t) for (var r = n.length - 1; r >= 0; r--) n[r] === t && n.splice(r, 1); else delete A[e];
return S;
};
var O = S.emit = function(e, t) {
var n = A[e], r;
if (n) {
n = n.slice();
while (r = n.shift()) r(t);
}
return S;
}, M = /[^?#]*\//, _ = /\/\.\//g, D = /\/[^/]+\/\.\.\//, P = /^([^/:]+)(\/.+)$/, H = /{([^{]+)}/g, B = /^\/\/.|:\//, j = /^.*?\/\/.*?\//, F = document, I = location, q = i(I.href), R = F.getElementsByTagName("script"), U = F.getElementById("seajsnode") || R[R.length - 1], z = i(p(U) || q), W = F.getElementsByTagName("head")[0] || F.documentElement, X = W.getElementsByTagName("base")[0], V = /\.css(?:\?|$)/i, $ = /^(?:loaded|complete|undefined)$/, J, K, Q = navigator.userAgent.replace(/.*AppleWebKit\/(\d+)\..*/, "$1") * 1 < 536, G = /"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\/\*[\S\s]*?\*\/|\/(?:\\\/|[^\/\r\n])+\/(?=[^\/])|\/\/.*|\.\s*require|(?:^|[^$])\brequire\s*\(\s*(["'])(.+?)\1\s*\)/g, Y = /\\\\/g, Z = S.cache = {}, et, tt = {}, nt = {}, rt = {}, it = b.STATUS = {
FETCHING: 1,
SAVED: 2,
LOADING: 3,
LOADED: 4,
EXECUTING: 5,
EXECUTED: 6
};
b.prototype.resolve = function() {
var e = this, t = e.dependencies, n = [];
for (var r = 0, i = t.length; r < i; r++) n[r] = w(t[r], e.uri);
return n;
}, b.prototype.load = function() {
var e = this;
if (e.status >= it.LOADING) return;
e.status = it.LOADING;
var t = e.resolve();
O("load", t);
var n = e._remain = t.length, r;
for (var i = 0; i < n; i++) r = b.get(t[i]), r.status < it.LOADED ? r._waitings[e.uri] = (r._waitings[e.uri] || 0) + 1 : e._remain--;
if (e._remain === 0) {
e.onload();
return;
}
var s = {};
for (i = 0; i < n; i++) r = Z[t[i]], r.status < it.FETCHING ? r.fetch(s) : r.status === it.SAVED && r.load();
for (var o in s) s.hasOwnProperty(o) && s[o]();
}, b.prototype.onload = function() {
var e = this;
e.status = it.LOADED, e.callback && e.callback();
var t = e._waitings, n, r;
for (n in t) t.hasOwnProperty(n) && (r = Z[n], r._remain -= t[n], r._remain === 0 && r.onload());
delete e._waitings, delete e._remain;
}, b.prototype.fetch = function(e) {
function t() {
d(s.requestUri, s.onRequest, s.charset);
}
function n() {
delete tt[o], nt[o] = !0, et && (E(i, et), et = null);
var e, t = rt[o];
delete rt[o];
while (e = t.shift()) e.load();
}
var r = this, i = r.uri;
r.status = it.FETCHING;
var s = {
uri: i
};
O("fetch", s);
var o = s.requestUri || i;
if (!o || nt[o]) {
r.load();
return;
}
if (tt[o]) {
rt[o].push(r);
return;
}
tt[o] = !0, rt[o] = [ r ], O("request", s = {
uri: i,
requestUri: o,
onRequest: n,
charset: x.charset
}), s.requested || (e ? e[s.requestUri] = t : t());
}, b.prototype.exec = function() {
function e(t) {
return Z[e.resolve(t)].exec();
}
var n = this;
if (n.status >= it.EXECUTING) return n.exports;
n.status = it.EXECUTING;
var i = n.uri;
e.resolve = function(e) {
return w(e, i);
}, e.async = function(t, n) {
return b.use(t, n, i + "_async_" + r()), e;
};
var s = n.factory, o = k(s) ? s(e, n.exports = {}, n) : s;
return o === t && (o = n.exports), o === null && !V.test(i) && O("error", n), delete n.factory, n.exports = o, n.status = it.EXECUTED, O("exec", n), o;
}, b.define = function(e, n, r) {
var i = arguments.length;
i === 1 ? (r = e, e = t) : i === 2 && (r = n, C(e) ? (n = e, e = t) : n = t), !C(n) && k(r) && (n = y(r.toString()));
var s = {
id: e,
uri: w(e),
deps: n,
factory: r
};
if (!s.uri && F.attachEvent) {
var o = g();
o && (s.uri = o.src);
}
O("define", s), s.uri ? E(s.uri, s) : et = s;
}, b.get = function(e, t) {
return Z[e] || (Z[e] = new b(e, t));
}, b.use = function(t, n, r) {
var i = b.get(r, C(t) ? t : [ t ]);
i.callback = function() {
var t = [], r = i.resolve();
for (var s = 0, o = r.length; s < o; s++) t[s] = Z[r[s]].exec();
n && n.apply(e, t), delete i.callback;
}, i.load();
}, b.preload = function(e) {
var t = x.preload, n = t.length;
n ? b.use(t, function() {
t.splice(0, n), b.preload(e);
}, x.cwd + "_preload_" + r()) : e();
}, S.use = function(e, t) {
return b.preload(function() {
b.use(e, t, x.cwd + "_use_" + r());
}), S;
}, b.define.cmd = {}, e.define = b.define, S.Module = b, x.fetchedList = nt, x.cid = r, S.resolve = h, S.require = function(e) {
return (Z[w(e)] || {}).exports;
};
var st = /^(.+?\/)(\?\?)?(seajs\/)+/;
x.base = (z.match(st) || [ "", z ])[1], x.dir = z, x.cwd = q, x.charset = "utf-8", x.preload = function() {
var e = [], t = I.search.replace(/(seajs-\w+)(&|$)/g, "$1=1$2");
return t += " " + F.cookie, t.replace(/(seajs-\w+)=1/g, function(t, n) {
e.push(n);
}), e;
}(), S.config = function(e) {
for (var t in e) {
var n = e[t], r = x[t];
if (r && T(r)) for (var i in n) r[i] = n[i]; else C(r) ? n = r.concat(n) : t === "base" && (n.slice(-1) === "/" || (n += "/"), n = c(n)), x[t] = n;
}
return O("config", e), S;
};
})(this);